$(function(){
    $('.phone button').click(function(){
        if($('.phone input').val()){
            var sec = 3;
            // 按钮不可点击
            $(this).prop('disabled',true);
            var that = this;
            var timer = setInterval(function(){
                if(sec == 0){
                    $(that).text('发送');
                    $(that).prop('disabled',false);
                    clearInterval(timer);
                    return false
                }
                $(that).text('还剩下'+sec+'秒');
                console.log(this);
                sec--
            }, 1000);
            
        }else{
            alert('手机号不能为空')
        }
    })
})